﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace docExplorer
{
    public partial class uc_DocProperties : UserControl
    {
        public uc_DocProperties()
        {
            InitializeComponent();
        }

        public uc_DocProperties(string name, string category, string created, string local)
        {
            InitializeComponent();
            this.lblName.Text = name;
            this.lblCategory.Text = category;
            this.lblCreated.Text = created;
            this.lblLocal.Text = local;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Globals.ThisAddIn.CustomTaskPanes.Remove(Globals.ThisAddIn.DocPropertiesCTP);
        }

        private void btnOpenDoc_Click(object sender, EventArgs e)
        {
            AddinUtils.OpenDocument(lblLocal.Text + lblName.Text);
        }
    }
}
